/**
 * 基础菜单 商品管理
 */
<template>
  <div>
    <!-- 面包屑导航 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>欢迎您，{{user.name}}</el-breadcrumb-item>
    </el-breadcrumb>
    <!--当roleid为管理员-->
    <el-tabs type="border-card"  style="margin-top:50px">
      <el-tab-pane v-if="user.roleid==1||user.roleid==2">
        <span slot="label">
          <i class="el-icon-date"></i> 试题题库
        </span>
        <el-row :gutter="12">
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/question/banklist'})">题库列表</el-button>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/question/addquestion'})">试题添加</el-button>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/question/tag'})">试题标签</el-button>
            </el-card>
          </el-col>
        </el-row>
      </el-tab-pane>
      <el-tab-pane label="试卷管理" v-if="user.roleid==1||user.roleid==2">
        <el-row :gutter="12">
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/paper/paperlist'})">试卷列表</el-button>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/paper/edit'})">编辑试卷</el-button>
            </el-card>
          </el-col>
        </el-row>
      </el-tab-pane>
      <el-tab-pane label="考试管理" v-if="user.roleid==1||user.roleid==2">
        <el-row :gutter="12">
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/test/examlist'})">考试列表</el-button>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/test/examtype'})">考试分类</el-button>
            </el-card>
          </el-col>
        </el-row>
      </el-tab-pane>
      <el-tab-pane label="档案管理" v-if="user.roleid==1||user.roleid==3">
        <el-row :gutter="12">
          <el-col :span="8">
            <el-card shadow="hover">
              <el-button type="text" @click="$router.push({path:'/exam/user/userexam'})">学员考试管理</el-button>
            </el-card>
          </el-col>
        </el-row>
      </el-tab-pane>
    </el-tabs>

    <!--走马灯-->
    <el-carousel :interval="4000" type="card" height="200px" style="margin-top:50px">
      <el-carousel-item v-for="src in 6" :key="src">
        <h3 class="medium"></h3>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  //model
  data() {
    return {
      user: "",
      
    };
  },

  /**
   * 数据发生改变
   */

  /**
   * 创建完毕
   */
  created() {
    this.user = JSON.parse(localStorage.getItem("userdata"));
    console.log(this.user);
  },

  /**
   * 里面的方法只有被调用才会执行
   */
  methods: {},
};
</script>

<style>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
  background-image: url("../../../static/bear.jpg");
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
  background-image: url("../../../static/ve.jpg");
}
</style>

 
 